<template>
  <div class="a-wp">
  	<a-input v-model:value="_d.value" type="text"/>
  	<a-button type="primary" @click="toB()">点击</a-button>
  	<div class="t1">这是一段测试文字</div>
  </div>
</template>

<script setup>
	import { reactive, ref, onMounted } from 'vue'

	import {useRouter} from "vue-router";
	const router = useRouter();

	import {useTestStore} from "@/store/testStore.js";
	const testStore = useTestStore();

	const _d = reactive({
		value: testStore.data
	})

	onMounted(() => {
	
	})

	function toB() {
		testStore.setData(_d.value);
		router.push({
			path: '/b'
		})
	}


</script>

<style lang="less" scoped>
.a-wp {
	margin: 0 auto;
	width:  1000px;
}
.t1 {
	color: @primary-color;
}
</style>